<script>
$(document).ready(function(){
	$("#checkAll").click(function(){
	      $.each($("INPUT[@name='sn[]'][type='checkbox']"),function(){
	    	  $(this).attr('checked', !$(this).is(':checked'));
		  });
	 });
});
</script>

<table >
<thead>
<tr>
<th><input type="checkbox"  id="checkAll"><?php echo $this->translate('number')?></th>
<th><?php echo $this->translate('student id')?></th>
<th><?php echo $this->translate('student name')?></th>
</tr>
</thead>
<tbody>
<?php foreach($this->data as $val):?>
<tr>
<td>
<input type="checkbox" name="sn[]" value="<?php echo $val['sn']?>" />
<?php echo $val['number']?></td>
<td><?php echo $val['student_id']?></td>
<td><?php echo $val['name']?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
